package com.atguigu.day04;

import java.util.Scanner;

public class Test9 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int LINE = 9;
        LINE = s.nextInt();
        for (int i = 0; i <= (LINE + 1) / 2; i++) {
            for (int j = 0; j < ((LINE + 1) / 2) - i; j++)
                System.out.print("   ");
            for (int k = 0; k < 2 * i - 1; k++)
                System.out.print(" * ");

            System.out.println();
        }
        for (int i = (LINE + 1) / 2 + 1; i < LINE + 1; i++) {
            for (int j = 1; j < i - ((LINE - 1) / 2); j++) {
                System.out.print("   ");
            }
            for (int k = (LINE * 2 + 1) - 2 * i; k > 0; k--)
                System.out.print(" * ");
            System.out.println();
        }
        int subLine = 9;
        subLine = s.nextInt();
        for (int i = 0; i < (subLine + 1) / 2; i++) {
            for (int j = 0; j < (subLine - 1) / 2 - i; j++) {
                System.out.print("   ");
            }
            for (int k = 0; k <= 2 * (i - 1) + 1; k++) {
                if (k == 0)
                    System.out.print(" * ");
                else
                    System.out.print("   ");
            }
            System.out.print(" * ");
            System.out.println();
        }
        for (int i = (subLine + 1) / 2 + 1; i < subLine + 1; i++) {
            for (int j = 0; j < i - ((subLine + 1) / 2); j++) {
                System.out.print("   ");
            }
            for (int k = 0; k <= (2 * subLine - 1 - 2 * i); k++) {
                if (k == 0)
                    System.out.print(" * ");
                else
                    System.out.print("   ");
            }
            System.out.print(" * ");
            System.out.println();
        }

    }
}
/*
i   1   2   3   4   5   6   7   8   9
j   4   3   2   1   0   1   2   3   4
k   1   3   5   7   9   7   5   3   1
   17  15  13  11    13   12  11  10
                     8    7   6   5

1   2   3   4   5   6   7   8   9
4   3   2   1   0   1   2   3   4
0  0 2 0 4 0 6 0 8 0 6 0 4 0 2  0



 */
